package @{dtoPkg};

<?
var date = date();
?>

/**
 * @{tableRemark}
 * 
 * @author  草原狼
 * 
 * @{date,'yyyy年MM月dd日'}
 */

public class @{EntityModel}DTO {
	
	<? for(field in fields){
	   var javaType = field.javaType;
	   if(javaType == 'Boolean'){
			javaType = 'boolean';
		}else if(javaType == 'Double'){
			javaType = 'double';
		}else if(javaType == 'Float'){
			javaType = 'float';
		}else if(javaType == 'Long'){
			javaType = 'long';
		}else if(javaType == 'Short'){
			javaType = 'short';
		}else if(javaType == 'Integer'){
			javaType = 'int';
		}else{
			javaType = field.javaType;
		}
	?>
	//@{field.remark}   
	private @{javaType} @{field.name};
	<? } ?>
	
	<? for(field in fields){ 
		var name = field.name;
		name = str.capitalize(name);
		var type = field.javaType;
		var get = "get";
		if(type == 'Boolean'){
			get = 'is';
		}
		var javaType = field.javaType;
		if(javaType == 'Boolean'){
			javaType = 'boolean';
		}else if(javaType == 'Double'){
			javaType = 'double';
		}else if(javaType == 'Float'){
			javaType = 'float';
		}else if(javaType == 'Long'){
			javaType = 'long';
		}else if(javaType == 'Short'){
			javaType = 'short';
		}else if(javaType == 'Integer'){
			javaType = 'int';
		}else{
			javaType = field.javaType;
		}
	?>
	
	public void set@{name}(@{javaType} @{field.name}){		 
		this.@{field.name} = @{field.name};
	}
	
	public @{javaType} @{get}@{name}(){
		return this.@{field.name};
	}
	<? } ?>
	
	@Override
	public String toString() {
		return @{toStr};
	}
}
